package com.example.demo.core.event;

import org.springframework.context.ApplicationEvent;

/**
 * @author xkx
 */
public class EmailEvent extends ApplicationEvent {

  private static final long serialVersionUID = 1L;
  private String address;
  private String text;

  public String getAddress() {
    return address;
  }

  public void setAddress(String address) {
    this.address = address;
  }

  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }

  /**
   *
   * @param source
   */
  public EmailEvent(Object source) {
    super(source);
  }

  /**
   *
   * @param source
   * @param address
   * @param text
   */
  public EmailEvent(Object source, String address, String text) {
    super(source);
    this.address = address;
    this.text = text;
  }

  public void print() {
    System.out.println("hello spring event!");
  }

}  